#ifndef VBASICBLOCKBUILDER_H
#define VBASICBLOCKBUILDER_H

#include "crossbit/VBlockBuilder.h"

namespace crossbit {

    class VBasicBlockBuilder : public VBlockBuilder {
        public:

            VBasicBlockBuilder() 
                : bb_end(false)
            {}

            virtual void add(VInst *inst);

            virtual bool isEnd() { 
                return bb_end; 
            }

            virtual VBlock *wrapUp(XTMemAddr pc) {
                bb_end = false;
                return VBlockBuilder::wrapUp(pc);
            }

        protected:
            bool bb_end;
    };

}

#endif
